package test_damage

import (
    `io`
)

func WriteAndClose(dest io.WriteCloser, content string) error {
    defer dest.Close()
    _, err := dest.Write([]byte(content))

    if err != nil {
        return err
    }

    return nil
}
